#ifndef INDEX_H
#define INDEX_H

#include <QWidget>
#include <QWebSocket>


namespace Ui {
class Index;
}

class Index : public QWidget
{
    Q_OBJECT

public:
    explicit Index(QWidget *parent = nullptr);
    ~Index();

private slots:
    void on_pushButton_listen_clicked();

    void on_pushButton_close_clicked();

    void slotConnected();

    void slotRecvTextMsg(QString message); // 接受字符数据

private:
    Ui::Index *ui;
    QWebSocket*socket=nullptr;

};

#endif // INDEX_H
